<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/2/24
 * Time: 15:29
 */

namespace app\index\validate;


use think\Validate;

class RegisterValidate extends Validate
{
    protected $rule = [
        'name' => 'require|max:25',
        'name_input' => 'require|max:25',
        'idcard' => 'require|idCard',
        'password' => 'require',
        'confirmPassword' => 'require|confirm:password'
    ];
    protected $message = [
        'name.require' => "用户名必须填写",
        'name.max' => "用户名必须小于25个字符",
        'name_input.require' => "真实姓名必须填写",
        'idcard.require' => '身份证号 必须填写',
        'idcard.idCard' => '身份证号格式错误',
        'password.require' => "密码必须填写",
        'confirmPassword.require' => "确认密码必须填写",
        "confirmPassword.confirm" => "两次密码输入不一致"
    ];
}